#ifndef NJF_FIXED_MATH_H
#define NJF_FIXED_MATH_H

#include "raster-fixed.h"
#include "raster-util.h"

/* useful PI stuff */
#define FIXED_PI        0x0003243F
#define FIXED_TWOPI     0x0006487E
#define FIXED_HALFPI    0x0001921F
#define FIXED_INVPI     0x0000517C
#define FIXED_PISQ      0x0009696E // 9DE9B?
#define FIXED_PISQRT    0x0000C5C0
/* useful fractions */
#define FIXED_QUARTER   0x00004000
#define FIXED_3QUARTER  0x0000C000
#define FIXED_EIGTH     0x00002000
#define FIXED_3EIGTH    0x00006000
#define FIXED_16TH      0x00001000
#define FIXED_32ND      0x00000800

/*
    all functions work on radians, not degrees
*/
EXTERNC Fixed __cdecl FixedSin(Fixed x);
EXTERNC Fixed __cdecl FixedCos(Fixed x);
EXTERNC Fixed __cdecl FixedTan(Fixed x);

EXTERNC Fixed __cdecl FixedAsin(Fixed x);
EXTERNC Fixed __cdecl FixedAcos(Fixed x);
EXTERNC Fixed __cdecl FixedAtan(Fixed x);

EXTERNC Fixed __cdecl FixedSqrt(Fixed x);
EXTERNC Fixed __cdecl FixedPowInt(Fixed base, int pow);
EXTERNC Fixed __cdecl FixedPow(Fixed base, Fixed pow);

#endif /* NJF_FIXED_MATH_H */
